<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>循环边框</title>
    <style>
        .box {
            position: relative;
            margin: 200px auto;
            width: 286px;
            height: 286px;
            background-color: lightgreen;
            border-radius: 50%;
            transform: rotate(-45deg);
        }

        .box::before {
            content: " ";
            box-sizing: border-box;
            position: absolute;
            left: 50%;
            top: 50%;
            margin-left: -157.5px;
            margin-top: -157.5px;
            width: 315px;
            height: 315px;
            border-radius: 50%;
            border: 15px solid transparent;
            border-left: 15px solid pink;
            border-top: 15px solid pink;
            transition: all 8s ease;
        }

        .box::after {
            content: " ";
            box-sizing: border-box;
            position: absolute;
            left: 50%;
            top: 50%;
            margin-left: -157.5px;
            margin-top: -157.5px;
            width: 315px;
            height: 315px;
            border-radius: 50%;
            border: 15px solid transparent;
            border-right: 15px solid skyblue;
            border-bottom: 15px solid skyblue;
            transition: all 8s ease;
        }

        .box:hover::before {
            transform: rotate(1080deg);
        }

        .box:hover::after {
            transform: rotate(1080deg);
            border: 15px solid transparent;

        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>